<table id="timelinetable" cellspacing="0" cellpadding="5">
<?php

	include_once("_post.php");


	$prunecount = 0;

	
	foreach ((array)$jsonDecode as $timelineEntry)
	{
		$pruneamount = 0;
		@session_start();
		$access_token = $_SESSION['access_token'];
		$topdir = "/home/glidecas/public_html/chirplace1.0.0.0.com/usr/".$access_token['user_id']."/prune/".$timelineEntry->user->id.".pne";
		if (is_file($topdir))
		{
			$fh = @fopen($topdir, 'r');
			$pruneamount = @fread($fh, filesize($topdir));
			@fclose($fh);
		}
		$threshold = rand(1, 100);


		if ($pruneamount>$threshold)
		{
			$prunecount++;
		}
		else
		{
			//i need to check for shorty codes here and unwind them
			
			$timelineEntry->text = formatTweet($timelineEntry->text);
			if (strcmp(trim($timelineEntry->text), "--nopost")!=0)
			{
?>
		<tr>
		<td valign="top">
			<a class="dock-item2" href="http://www.twitter.com/<?php echo $timelineEntry->user->screen_name; ?>"><img src="<?php echo $timelineEntry->user->profile_image_url; ?>" alt="(~.~)" title="<?php echo $timelineEntry->user->description;?>" width="48" height="48" border="0" /></a><form action="index.php" method="GET"><input type="hidden" name="start" value="prune" /><input type="hidden" name="tuser" value="<?php echo $timelineEntry->user->id; ?>" /><input type="hidden" name="tusername" value="<?php echo $timelineEntry->user->screen_name; ?>" /><input type="image" src="images/pruneicon.jpg" alt="Prune <?php echo $timelineEntry->user->screen_name; ?>. Current level: <?php echo $pruneamount; ?>" title = "Prune <?php echo $timelineEntry->user->screen_name; ?>. Current level: <?php echo $pruneamount; ?>" value="p" /></form>
		</td>
		<td valign="top"><a href="http://www.twitter.com/<?php echo $timelineEntry->user->screen_name; ?>"><?php echo $timelineEntry->user->screen_name; ?></a> <span><?php echo ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]", "<a href=\"\\0\">\\0</a>", $timelineEntry->text); ?></span><div id="entrysource"><?php echo formatDate($timelineEntry->created_at); ?> from <?php echo $timelineEntry->source; ?></div></td>
		</tr>
		<tr>
			<td colspan="2"><hr id="simplehr" /></td>
		</tr>
<?php
			}
		}
	}
	
?> 
	<tr>
		<td colspan="2"><div id="entrysource"><?php echo $prunecount; ?> posts were pruned from this list.</div></td>
	</tr>
</table> 
